package py.progweb.sgc.gui.shared.dialogmodel;

import java.io.Serializable;
import java.util.HashMap;

public class DataRecord implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private HashMap<String, Object> atributos = new HashMap<String, Object>();
	
	public void setAtributo(String nombre, Object valor) {
		atributos.put(nombre, valor);
	}
	
	public Object getAtributo(String nombre) {
		return atributos.get(nombre);
	}
	
	public String[] getAtributos() {
		return atributos.keySet().toArray(new String[atributos.keySet().size()]);
	}
	
	public Object getPK() {
		return getAtributo("_pk");
	}
	
	public void setPK(Object pk) {
		setAtributo("_pk", pk);
	}
	
	public String getClassName() {
		return (String)getAtributo("_className");
	}
	
	public void setClassName(String name) {
		setAtributo("_className", name);
	}
}
 